/**
 * Created by cqmcqm on 2015/6/1.
 */


var FESW=FESW||function(){};

/**
 * 根据范围生成随机数
 */
FESW.prototype.random=function(min,max)
{
    return (Math.floor(Math.random() *(max-min+1))+min);
}

/**
 * 根据种子生成随机数列
 */
FESW.prototype.randomBySeed=function(min, max, amount, seed)
{
    var randoms = [];
    max = max || 1;
    min = min || 0;
    max += 1;
    while (randoms.length < amount) {
        seed = (seed * 9301 + 49297) % 233280;
        var rnd = seed / 233280;
        randoms.push(parseInt((min + rnd * (max - min))))
    }
    return randoms;
}



